package com.wwu.common.enums;

/**
 * 新增菜单时选择可以生成的按钮
 * @author 一蓑烟雨
 * @version 1.0.0
 * @date 2023-06-28 11:45
 */
public enum MenuBtnEnum {
    SHOW("show","查询",1),
    ADD("add","新增",2),
    EDIT("edit","编辑",3),
    UPDATE("update","更新",4),
    DEL("del","删除",5),
    REFRESH("refresh","刷新",6),
    ENABLE("enable","启用",7),
    DISABLE("disable","禁用",8),
    STATUS("status","禁/启用",9),
    EXPORT("export","导出",10),
    EXPAND("expand","展开",11),
    FOLD("fold","收起",12),
    ROLE("role","角色",13),
    AUTH("auth","授权",14),
    CONFIG("config","配置",15),
    DETAIL("detail","详细",16),
    CLEAR("clear","清空",17),
    PICK_OUT("pickOut","强制退出",18),
    LOCK("lock","解锁",19),
    INIT_MENU("initMenu","获取菜单",20),
    OTHER("other","其它",30);

    private String code;
    private String name;
    private Integer sort;

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public Integer getSort() {
        return sort;
    }

    /**
     * 构造函数
     * @param code  编码
     * @param name  名称
     * @param sort  排序码
     * @author 一蓑烟雨
     * @date 2023/6/28 11:51
     */
    private MenuBtnEnum(String code, String name, Integer sort) {
        this.code = code;
        this.name = name;
        this.sort = sort;
    }

    /**
     * 重写toString方法
     * @return java.lang.String
     * @author 一蓑烟雨
     * @date 2023/6/28 11:51
     */
    @Override
    public String toString() {
        return this.code + "-" + this.name+"-" + this.sort;
    }
}
